﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lenovo.CFI.Common.Sys
{
    public class Team
    {
        #region ctor

        /// <summary>
        /// 构造函数
        /// </summary>
        public Team()
        {
            this.uid = Guid.NewGuid();
            this.enabled = true;
        }

        #endregion

        private int id;
        private string title;
        private bool enabled;
        private string manager;
        private string vp;
        private bool gddl;
        private Guid uid;

        #region properity

        /// <summary>
        /// 获取或设置标识
        /// </summary>
        public int ID
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 获取或设置标题
        /// </summary>
        public string Title
        {
            get { return title; }
            set { title = value; }
        }
        /// <summary>
        /// 获取或设置是否有效
        /// </summary>
        public bool Enabled
        {
            get { return enabled; }
            set { enabled = value; }
        }

        /// <summary>
        /// 非GDDL的Team可以为NULL
        /// </summary>
        public string Manager
        {
            get { return manager; }
            set { manager = value; }
        }

        /// <summary>
        /// 非GDDL的Team可以为NULL
        /// </summary>
        public string VP
        {
            get { return vp; }
            set { vp = value; }
        }

        /// <summary>
        /// 原则上，不应当增加GDDL的Team -- 这些Team应当是同步过来的
        /// </summary>
        public bool GDDL
        {
            get { return gddl; }
            set { gddl = value; }
        }

        public Guid UID
        {
            get { return uid; }
            set { uid = value; }
        }

        /// <summary>
        /// 获取显示名称和标识。
        /// </summary>
        public string DisplayID
        {
            get { return String.Format("{0}({1})", this.title, this.uid); }
        }

        #endregion

    }
}
